// 4973
import { isNum } from './isNum'
import { isFn } from './isFn'
/**
 * 检查值是否是类数组对象
 * isArrLike('test'); // -> true
   isArrLike(document.body.children); // -> true;
   isArrLike([1, 2, 3]); // -> true
 * dependencies isNum isFn
 * @param {*} val 
 * @returns 
 */
export function isArrLike (val) {
  var MAX_ARR_IDX = Math.pow(2, 53) - 1;
  if (!val) return false;
  var len = val.length;
  return isNum(len) && len >= 0 && len <= MAX_ARR_IDX && !isFn(val);
}